#include "ThreadManager.h"

CThreadManager::CThreadManager()
{
	m_iNumOfThread = 10;
	m_pool = new CHt_Hq_ThreadPool(m_iNumOfThread);
}

CThreadManager::CThreadManager(int iNum)
{
	m_iNumOfThread = iNum;
	m_pool = new CHt_Hq_ThreadPool(m_iNumOfThread);
}

CThreadManager::~CThreadManager()
{
	if (NULL == m_pool)
		delete m_pool;
}

void CThreadManager::Run(CJob * pJob, void * pJobData)
{
	m_pool->Run(pJob, pJobData);
}

void CThreadManager::TerminateAll(void)
{
	m_pool->TerminateAll();
}
